<template>
	<view>
		<view class="goods_list">
			<view class="goods_item" v-for="i in goods" :key="i.id" @click="navigator(i.id)">
				<image src="https://img0.baidu.com/it/u=1517999249,2978302508&fm=253&fmt=auto&app=138&f=JPEG?w=752&h=500" ></image>
				<view class="price">
					<text>￥{{i.sell_price}}</text>
					<text>￥{{i.market_price}}</text>
				</view>
				<view class="name">
					{{i.title}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		props:[
			'goods'
		],
		
		methods: {
			navigator(id){
				
				this.$emit('goodsItemClick',id)
			}
		}
	}
</script>

<style lang="less">
	.goods_list{
			padding: 0 15rpx;
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;
			.goods_item{
				background: #fff;
				width:350rpx ;
				margin: 10rpx 0;
				padding: 10rpx;
				box-sizing: border-box;
				image{
					width: 100%;
					height: 150px;
				}
				.price{
					color: #b50e03;
					font-size: 36rpx;
					margin: 0 10rpx;
					text:last-child{
						margin-left: 10rpx;
						color: #ccc;
						font-size: 25rpx;
						text-decoration: line-through;
					}
				}
				.name{
					font-size: 25rpx;
					line-height: 50rpx;
					padding: 3px 0 12px 0;
				}
			}
		}
</style>
